#define  _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
	FILE* pf = fopen("bite", "w");
	if (pf == NULL)
	{
		perror("pf");
		exit(1);
	}
	const char* str = "linux so easy!";
	fwrite(str, sizeof(char), strlen(str), pf);
	pf = freopen("bite", "r", pf);
	if (pf == NULL)
	{
		perror("pf");
		exit(1);
	}
	char buffer[64];
	size_t ret = fread(buffer, 1, strlen(str), pf);
	if (ret > 0)
	{
		buffer[ret] = '\0';
		printf("%s\n", buffer);
	}
	fclose(pf);

	return 0;
}
